package com.example.shoppingmall.pojo;

public class Pages {

    private Integer currentPage;
    private Integer totalPageCount;
    private Integer totalCount;
    private Integer pageSize = 6;

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(Integer totalPageCount) {
        this.totalPageCount = totalPageCount;
        if(totalPageCount>0){
            this.totalCount = totalPageCount % pageSize == 0 ? (totalPageCount / pageSize) : (totalPageCount / pageSize+1) ;
        }
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
